﻿using System;
using System.Collections.Generic;
using System.Web.Security;
using KeyCore.Framework.Model;

namespace KeyCore.Framework.DAL.Interfaces
{
    public interface IUsersRepository
    {
        MembershipUser CreateUser(string userName, string password, string email, bool isCreatedByAdmin);
        string GetUserNameByEmail(string email);
        MembershipUser GetUser(string userName);
        MembershipUser GetUser(Guid userId);
        Users GetUserByUserId(Guid userId);
        Users GetUserByUserName(string userName);
        Users GetUserByEmail(string email);
        bool ValidateUser(string userName, string password);
        bool ActivateUser(Guid userId, string code);
        void ResetPassword(Guid userId);
        bool CheckPasswordResetCode(Guid userId, string code);
        void SetLastLoginDate(string userName);
        bool ChangePassword(string userName, string newPassword);
        bool ChangeEmail(string userName, string email);
        int GetNumberOfUsersByEmail(string email);
        List<Users> GetAllUsers();
        List<Users> GetAllUsers(int startRowIndex, int maximumRows, out int totalRecords);

        ICollection<Users> GetUsersByName(string userName);
        IEnumerable<Users> GetUsersByName(string userName, int startRowIndex,
                                          int maximumRows, out int totalRecords);

    }
}
